package br.com.nrti.still.eventos;

import android.content.Context;
import android.media.AudioManager;

public class Toque {
	public static final String ACAO_TOQUE_NAO_ALTERAR = "NAO";
	public static final String ACAO_TOQUE_SILENCIAR = "SIL";
	public static final String ACAO_TOQUE_NORMAL = "NOR";
	public static final String ACAO_TOQUE_VIBRAR = "VIB";
	public static final String ACAO_ALARME_VOLTAR_ANTERIOR = "ANT";	
	
	private static AudioManager aManager;
	
	public static void inicializar(Context context) {
		aManager = (AudioManager) context.getSystemService(context.AUDIO_SERVICE);
	}
	
	public static void setNormal() {
		aManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
	}
	
	public static void setMudo() {
		aManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
	}
	
	public static void setVibrar() {
		aManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
	}
	
	public static int getAtual() {
		return aManager.getRingerMode();
	}
}
